//package com.sx.manage.controller.consumer.person;
//
//import javax.annotation.Resource;
//
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import com.sx.common.util.NumberUtil;
//import com.sx.manage.biz.consumer.info.IMNetworkPersonConsumerBiz;
//import com.sx.manage.controller.base.MBaseController;
//import com.sx.manage.service.consumer.MAutoTakeMoneyServiceImpl;
//import com.sx.manage.servlet.ViewAndModel;
//import com.sx.model.constants.MSystemConstants;
//import com.sx.model.manage.mybatis.form.consumer.MPersonalConsumerNetworkForm;
//import com.sx.model.manage.mybatis.vo.consumer.MPersonalConsumerVO;
//import com.sx.model.manage.mybatis.vo.result.ResultBooleanVO;
//import com.sx.model.manage.mybatis.vo.result.ResultListVO;
//
///**
// * 个人用户自动提现
// * 
// * @author lenovo
// *
// */
//@Controller
//@RequestMapping("/consumerWithdraw")
//public class MConsumerAutomaticWithdrawController extends MBaseController {
//	private Logger log = LoggerFactory.getLogger(this.getClass());
//	// 个人用户信息
//	@Resource(name = "mNetworkPersonConsumerBizImpl")
//	private IMNetworkPersonConsumerBiz mNetworkPersonConsumerBizImpl;
//
//	@Resource(name = "autoTakeMoneyServiceImpl")
//	private MAutoTakeMoneyServiceImpl autoTakeMoneyServiceImpl;
//
//	/**
//	 * 列表页跳转
//	 * 
//	 * @return
//	 */
//	@RequestMapping("autoWithdrawIndex")
//	public ViewAndModel autoWithdrawIndex() {
//		ViewAndModel model = new ViewAndModel(request, cache);
//		model.setViewName("consumer/withdraw/autoWithdrawIndex");
//		return model;
//	}
//
//	/**
//	 * 跳转到添加界面
//	 * 
//	 * @return
//	 */
//	@RequestMapping("addAutoWithdraw")
//	public ViewAndModel addAutoWithdraw() {
//		ViewAndModel model = new ViewAndModel(request, cache);
//		model.setViewName("consumer/withdraw/addAutoWithdraw");
//		return model;
//	}
//
//	/**
//	 * 翻页数据查询
//	 * 
//	 * @return
//	 */
//	@RequestMapping("autoPage")
//	@ResponseBody
//	public ResultListVO<MPersonalConsumerVO> autoPage(MPersonalConsumerNetworkForm form) {
//		log.info("自动提现用户列表form={}",form);
//		return this.mNetworkPersonConsumerBizImpl.auto_withdraw_page(form);
//	}
//
//	/**
//	 * 添加数据也的查询
//	 * 
//	 * @return
//	 */
//	@RequestMapping("addAutoPage")
//	@ResponseBody
//	public ResultListVO<MPersonalConsumerVO> addAutoPage(MPersonalConsumerNetworkForm form) {
//		// 不是自动提现的才需要展示
//		form.setAuto_withdraw(MSystemConstants.AUTO_TAKE_MONEY_NO);
//		log.info("添加自动提现用户列表form={}",form);
//		return this.mNetworkPersonConsumerBizImpl.auto_withdraw_page(form);
//	}
//
//	/**
//	 * 设置用户为自动提现
//	 * 
//	 * @return
//	 */
//	@RequestMapping("addAuto")
//	@ResponseBody
//	public ResultBooleanVO addAuto(Long[] consumer_ids) {
//		log.info("添加自动提现用户consumer_ids={}",NumberUtil.arrayToStr(consumer_ids));
//		return this.mNetworkPersonConsumerBizImpl.add_auto_withdraw(consumer_ids, loginConsumer());
//	}
//
//	/**
//	 * 删除提现用户
//	 * 
//	 * @return
//	 */
//	@RequestMapping("deleteAuto")
//	@ResponseBody
//	public ResultBooleanVO deleteAuto(Long[] consumer_ids) {
//		log.info("删除自动提现用户consumer_ids={}",NumberUtil.arrayToStr(consumer_ids));
//		return this.mNetworkPersonConsumerBizImpl.consumer_autoWithdraw_edit(consumer_ids, MSystemConstants.AUTO_TAKE_MONEY_NO, loginConsumer());
//	}
//
//	/**
//	 * 手工提现
//	 * 
//	 * @return
//	 */
//	@RequestMapping("handWithdraw")
//	@ResponseBody
//	public ResultBooleanVO handWithdraw(Long[] consumer_ids) {
//		if (null == consumer_ids) {
//			return new ResultBooleanVO(false, null, "没有要提现的用户");
//		}
//		log.info("手工自动提现consumer_ids={}",NumberUtil.arrayToStr(consumer_ids));
//		return autoTakeMoneyServiceImpl.tank_money(consumer_ids);
//	}
//
//	public MAutoTakeMoneyServiceImpl getAutoTakeMoneyServiceImpl() {
//		return autoTakeMoneyServiceImpl;
//	}
//
//	public void setAutoTakeMoneyServiceImpl(MAutoTakeMoneyServiceImpl autoTakeMoneyServiceImpl) {
//		this.autoTakeMoneyServiceImpl = autoTakeMoneyServiceImpl;
//	}
//
//}
